<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
<form action="?">
    <div class="tt"><?php echo $MOD['name'];?>搜索</div>
    <input type="hidden" name="moduleid" value="<?php echo $moduleid;?>"/>
    <input type="hidden" name="action" value="<?php echo $action;?>"/>
    <table cellpadding="2" cellspacing="1" class="tb">
	    <tr>
		    <td>
			    &nbsp;<?php echo $fields_select;?>&nbsp;
			    <input type="text" size="30" name="kw" value="<?php echo $kw;?>" title="关键词"/>&nbsp;
			    分类:<?php echo Post::autocatTree('alid', AutoCategory::TYPE_PICTURE, '选择分类' ,$alid, 'datatype="n" nullmsg="请选择分类"');?>
			    <input type="text" name="psize" value="<?php echo $pagesize;?>" size="2" class="t_c" title="条/页"/>
		    </td>
	    </tr>
        <tr>
            <td>
	            &nbsp;车系选择:&nbsp;
	            <?php echo Post::autoCombo('arbid','arcid','armid', $arbid, $arcid, $armid , 0, 0, 0); ?>
            </td>
	    </tr>
	    <tr>
	        <td>
		        <input type="submit" value="搜 索" class="btn"/>&nbsp;
		        <input type="button" value="重 置" class="btn" onclick="window.location='?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=<?php echo $action;?>';"/>
	        </td>
        </tr>
    </table>
</form>
<form method="post">
    <div class="tt"><?php echo $menus[$menuid][0];?></div>
    <table cellpadding="2" cellspacing="1" class="tb">
        <tr>
            <th width="25"><input type="checkbox" onclick="checkall(this.form);"/></th>
            <th>排序</th>
            <th>图片名称</th>
            <th>缩略图</th>
            <th width="120"><?php echo $timetype == 'add' ? '添加' : '更新';?>时间</th>
            <th width="50">操作</th>
        </tr>
		<?php foreach ($lists as $k => $v) { ?>
        <tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
            <td><input type="checkbox" name="apid[]" value="<?php echo $v['apid'];?>"/></td>
            <td><?php echo $v['listorder'];?></td>
            <td><?php echo $v['title'];?></td>
            <td><img src="<?php echo Picture::thumb($v['imgurl'], $MOD['thumb_width'], $MOD['thumb_height']);?>" /></td>
            <td class="px11" title="更新时间<?php echo $v['edittime'];?>"><?php echo $v['edittime'];?></td>
            <td>
                <a href="?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=edit&arcid=<?php echo $v['arcid']; ?>&apid=<?php echo $v['apid'];?>"><img src="admin/image/edit.png" width="16" height="16" title="修改" alt=""/></a>&nbsp;
                <a href="?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=delete&arcid=<?php echo $v['arcid']; ?>&apid=<?php echo $v['apid'];?>" onclick="return _delete();"><img src="admin/image/delete.png" width="16" height="16" title="删除" alt=""/></a>
            </td>
        </tr>
		<?php }?>
    </table>
    <div class="btns">
        <input type="button" value="批量删除" onclick="this.form.action='?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=delete';this.form.submit();" />
    </div>
</form>
<div class="pages"><?php $do->getPn()->render();?>
	<?php if ($do->getPn()->getPages()>1){;?>
		到第</span>
		<input type="text" name="page-num-input" id="xd_page_jump"/>
		<span>页</span>
		<button type="submit" onclick="xdChangeAndLocation('page', $('#xd_page_jump').val())">确定</button>
	<?php };?></div>
</div>
<br/>
<script type="text/javascript">Menuon(<?php echo $menuid;?>);</script>
<?php include tpl('footer'); ?>